<?php

use yii\db\Migration;

class m190117_102904_hello extends Migration
{
    public function safeUp()
    {
        $this->createTable('{{%hello}}', [
            'id' => $this->primaryKey(),
            'username' => $this->string()->notNull()->unique(),
            'status' => $this->smallInteger()->notNull()->defaultValue(10),
            'created_at' => $this->integer()->notNull(),
            'updated_at' => $this->integer()->notNull(),
        ]);

    }

    public function safeDown()
    {
        echo "m190117_102904_hello cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m190117_102904_hello cannot be reverted.\n";

        return false;
    }
    */
}
